﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace StudentsDB
{
    public partial class Speciality : Form
    {
        public Speciality()
        {
            InitializeComponent();
        }

        private void Speciality_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < SpecialityGridView.Rows.Count; i++)
            {
                SpecialityGridView.Rows[i].Cells[3].Value = new Bitmap(@"D:\Kate\Documents\Visual Studio 2010\Projects\StudentsDB\Icons\Toolbars\ObjectEdit.ico");
                SpecialityGridView.Rows[i].Cells[4].Value = new Bitmap(@"D:\Kate\Documents\Visual Studio 2010\Projects\StudentsDB\Icons\Toolbars\Delete.ico");
            }
        }

        private void SpecialityGridView_UserAddedRow(object sender, DataGridViewRowEventArgs e)
        {
            SpecialityGridView.Rows[SpecialityGridView.Rows.Count - 1].Cells[3].Value = new Bitmap(@"D:\Kate\Documents\Visual Studio 2010\Projects\StudentsDB\Icons\Toolbars\ObjectEdit.ico");
            SpecialityGridView.Rows[SpecialityGridView.Rows.Count - 1].Cells[4].Value = new Bitmap(@"D:\Kate\Documents\Visual Studio 2010\Projects\StudentsDB\Icons\Toolbars\Delete.ico");
        }
    }
}
